package org.cloudnote.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.cloudnote.bean.NoteBook;

import java.util.List;

public interface NoteBookMapper {

    @Select("select * from cn_notebook where cn_user_id= #{userId}")
    @ResultMap("notebookResultMap")
    public List<NoteBook> selectByUserId(String userId);

    @Insert("INSERT INTO cn_notebook VALUES(#{noteBookId},#{userId},#{noteBookTypeId},#{noteBookName},#{noteBookDesc},#{noteBookCreateTime})")
    public int save(NoteBook noteBook);
}
